#if !defined(ximera_graphics_ogre_camera_hpp)
#define ximera_graphics_ogre_camera_hpp

// -----------------------------------------------------------

#include <ximera/graphics/icamera.hpp>
#include <ximera/graphics/ogre/iattachable.hpp>
#include <OgreSceneManager.h>

namespace ximera { namespace graphics { namespace ogre
{
    class XIMERA_PLUGIN_API Camera : public ICamera, public IAttachable
    {
    public:
        Camera(Ogre::SceneManager* sceneManager, String const& name);
        virtual ~Camera();

        virtual math::Vector3 position() const;
        virtual void position(math::Vector3 const& pos);

        virtual math::Quaternion orientation() const;
        virtual void orientation(math::Quaternion const& quat);
        
        virtual RenderMode renderMode() const;
        virtual void renderMode(RenderMode mode);

        virtual math::Vector3 direction() const;
        virtual void direction(math::Vector3 const& dir);

        virtual math::Vector3 up() const;
        virtual math::Vector3 right() const;

        virtual void lookAt(math::Vector3 const& point);

        virtual Real aspectRatio() const;
        virtual void aspectRatio(Real ratio);

        virtual Real nearClipDistance() const;
        virtual void nearClipDistance(Real distance);

        virtual Real farClipDistance() const;
        virtual void farClipDistance(Real distance);

        virtual Real fov() const;
        virtual void fov(Real fov);

        virtual void roll(Real angle);
        virtual void yaw(Real angle);
        virtual void pitch(Real angle);

        virtual void rotate(math::Vector3 const& angles);

        virtual Ogre::MovableObject* ogreMovableObject() const { return _ogreCamera; }
        Ogre::Camera* ogreCamera() const { return _ogreCamera; }

    private:
        Ogre::Camera* _ogreCamera;
        Ogre::SceneManager* _ogreSceneManager;
    };
}}}

// -----------------------------------------------------------

#endif
